package com.example.abstractfactory;/**
 * @className: TestController
 * @description:
 * @author: zhangjunfa
 * @date: 2022/6/9 9:02
 * @version 1.0.0
 */

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author zhangjunfa
 * @return
 * @date 2022/6/8 17:30
 */
public class TestController {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("花和尚");
        list.add("豹子头");
        list.add("摸着天");
        list.add("晁盖");
        list.add("鼓上骚");


        // A:
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }

        System.out.println();
        for (String res:list){
            System.out.println(res);
        }

        System.out.println();
        list.forEach(item->{
            System.out.println(item);
        });

        System.out.println();


    }
}
